<template>
  <div class="title-container">
    <el-row class="title-wrap" >
      <el-col :span="12">
        <h3>{{ describe }}</h3>
      </el-col>
      <el-col v-if="isText" :span="12" class="text-right" >测试文案</el-col>
      <el-col v-if="isBtn" :span="12" class="text-right">
        <el-button type="primary" size="mini" @click="doTitleBtn">{{ btnText }}</el-button>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'TitleContainer',
  props: {
    describe: {
      type: String,
      default: ''
    },
    isBtn: {
      type: Boolean,
      default: false
    },
    isText: {
      type: Boolean,
      default: false
    },
    text: {
      type: String,
      default: ''
    },
    btnText: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
    }
  },
  methods: {
    doTitleBtn() {
      this.$emit('titleBtn')
    }
  }
}
</script>
